<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

        class Parameter {
    
        private $parametersArray;//top_parameters解析后存在此数组中
        public function __construct($top_parameters) {  
                //$paramArray[]=new ArrayObject;
                $param = explode('&', mb_convert_encoding(base64_decode($top_parameters["get"]),"UTF-8","GBK") );
                foreach ($param as $key => $value) {
                        $s=explode('=', $value);
                        $paramArray[$s[0]]=$s[1];
                }
                $this->parametersArray= $paramArray;
        }
        
        public function getParamArray()
        {
                return $this->parametersArray;
        }
        
        public function getVisitorId()
        {
                return $this->parametersArray['visitor_id'];
        }
        
        public function getVisitorNick()
        {
                return $this->parametersArray['visitor_nick'];
        }
        
         public function getVisitorRole()
        {
                return $this->parametersArray['visitor_role'];
        }  
}


/* End of file Someclass.php */